home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 6
/
Aminet 6 - June 1995.iso
/
Aminet
/
dev
/
gcc
/
libnixV0_8.lha
/
gnu
/
libnix-sources.lha
/
sources
/
math
/
trans
/
fmod.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-12-12
|
304 b
|
18 lines
#ifdef __GNUC__
#include <inline/mathieeedoubbas.h>
#endif
static inline double floor(double x)
{ return IEEEDPFloor(x); }
static inline double ceil(double x)
{ return IEEEDPCeil(x); }
double fmod(double x,double y)
{ double a=x/y;
if(a>=0)
return x-y*floor(a);
else
return x-y*ceil(a);
}